<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="css/mui.min.css" rel="stylesheet" />
		<link href="style/fjol_style.css" rel="stylesheet" />
		<link rel="stylesheet" type="text/css" href="style/xol_style.css"/>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav newbgRed">
		    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
		    <h1 class="mui-title">房源详细信息</h1>
		</header>
		<div class="mui-scroll-wrapper" style="top: 45px;">
		    <div class="mui-scroll">
		        <!--这里放置真实显示的DOM内容-->
		        <!--<div class="pt5 pb5">楼盘信息</div>-->
		        <div class="pt5 pb5">基础属性</div>
		        <ul class="mui-table-view" id="buildingList">
	                <li class="mui-table-view-cell mui-clearfix">
						<p class="mui-pull-left mr10">房源户型</p>
						<span id="houseType">3房2厅2位</span>
					</li>
	                <li class="mui-table-view-cell mui-clearfix">
						<p class="mui-pull-left mr10">建筑面积</p>
						<span id="square"></span>
					</li>
	                <li class="mui-table-view-cell mui-clearfix">
						<p class="mui-pull-left mr10">套内面积</p>
						<span id="innerSquare"></span>
					</li>
	                <li class="mui-table-view-cell mui-clearfix">
						<p class="mui-pull-left mr10">梯户比例</p>
						<span id="elevatorRatio"></span>
					</li>
					
	                <li class="mui-table-view-cell mui-clearfix">
						<p class="mui-pull-left mr10">供暖方式</p>
						<span id="heatingName"></span>
					</li>
		        </ul>
		        <!--<div class="pt5 pb5">房源信息</div>-->
		        <div class="pt5 pb5">交易属性</div>
		        <ul class="mui-table-view" id="houseInfoList">
	                <li class="mui-table-view-cell mui-clearfix">
						<p class="mui-pull-left mr10">上次交易</p>
						<span id="lastTradingDate">3房2厅2位</span>
					</li>
	                <li class="mui-table-view-cell mui-clearfix">
						<p class="mui-pull-left mr10">房屋年限</p>
						<span id="age"></span>
					</li>
	                <li class="mui-table-view-cell mui-clearfix">
						<p class="mui-pull-left mr10">房屋用途</p>
						<span id="houseTypeName">普通住宅</span>
					</li>
	                <li class="mui-table-view-cell mui-clearfix">
						<p class="mui-pull-left mr10">交易权属</p>
						<span id="propertyTypeName">3房2厅2位</span>
					</li>
	                <li class="mui-table-view-cell mui-clearfix">
						<p class="mui-pull-left mr10">产权所属</p>
						<span id="propertyOwnerName">3房2厅2位</span>
					</li>
	                <li class="mui-table-view-cell mui-clearfix">
						<p class="mui-pull-left mr10">抵押信息</p>
						<span id="mortgageBank"></span>
					</li>
	                <li class="mui-table-view-cell mui-clearfix">
						<p class="mui-pull-left mr10">房本备件</p>
						<span id="premisesPermit"></span>
					</li>
	                <li class="mui-table-view-cell mui-clearfix">
						<p class="mui-pull-left mr10">土地年限</p>
						<span>详见业主土地证明材料或相关政府部门登记文件</span>
					</li>
		        </ul>
		        <p class="f08 mui-text-center mt10">以上信息为当日勘验录入，实际情况以看房时为准</p>
		    </div>
		</div>
		
		<script src="js/mui.min.js"></script>
		<script src="js/jquery-2.1.0.js"></script>
		<script src="js/jquery.tmpl.min.js"></script>
		<script src="js/fj_public_js.js"></script>
		
		<script type="text/javascript">
			mui.init();
			
			mui.plusReady(function(){
				var wv = plus.webview.currentWebview();
				var buildingParam = wv.buildingParam;
				var houseParam = wv.houseDetailInfo;
				var houseInfo = wv.houseInfo;
				console.log(JSON.stringify(houseInfo));
				
//				var buildingList = new Array();
//				var houseInfoList = new Array();
				
				//房源户型
				var bedRoomNumber = houseInfo.bedRoomNumber;
				var livingRoomNumber = houseInfo.livingRoomNumber;
				var toiletNumber = houseInfo.toiletNumber;
				document.querySelector('#houseType').innerHTML = bedRoomNumber+'室'+livingRoomNumber+'厅'+toiletNumber+'卫';
				
//				//建筑面积
//				document.querySelector('#square').innerHTML = (houseInfo.square?houseInfo.square:'')+'㎡';
//				
//				//套内面积
//				document.querySelector('#innerSquare').innerHTML = houseInfo.innerSquare?houseInfo.innerSquare:'暂无数据';
//				
//				//梯户比例
//				document.querySelector('#elevatorRatio').innerHTML = houseInfo.elevatorRatio?houseInfo.elevatorRatio:'暂无数据';
//				
//				//供暖方式
//				document.querySelector('#heatingName').innerHTML = houseInfo.heatingName?houseInfo.heatingName:'暂无数据';
//				
//				//上次交易
//				document.querySelector('#lastTradingDate').innerHTML = houseInfo.lastTradingDate?houseInfo.lastTradingDate:'暂无数据';
//				
//				//房屋年限
//				document.querySelector('#age').innerHTML = houseInfo.age?houseInfo.age:'暂无数据';
//				
//				//房屋用途
//				document.querySelector('#houseTypeName').innerHTML = houseInfo.houseTypeName?houseInfo.houseTypeName:'暂无数据';
//				
//				//交易权属
//				document.querySelector('#propertyTypeName').innerHTML = houseInfo.propertyTypeName?houseInfo.propertyTypeName:'暂无数据';
//				
//				//产权所属
//				document.querySelector('#propertyOwnerName').innerHTML = houseInfo.propertyOwnerName?houseInfo.propertyOwnerName:'暂无数据 ';
//				
//				//抵押信息
//				document.querySelector('#mortgageBank').innerHTML = houseInfo.mortgageBank?houseInfo.mortgageBank:'暂无数据 ';
//				
//				//房本备件
//				document.querySelector('#premisesPermit').innerHTML = houseInfo.premisesPermit?houseInfo.premisesPermit:'暂无数据';
				//建筑面积///////////////////////////////////////////////
				document.querySelector('#square').innerHTML = (houseInfo.square?houseInfo.square:'')+'㎡';
				
				//套内面积
				document.querySelector('#innerSquare').innerHTML = houseInfo.innerSquare?houseInfo.innerSquare+'㎡':'暂无数据';
				
				//梯户比例
				document.querySelector('#elevatorRatio').innerHTML = houseInfo.elevatorRatio?'1梯'+houseInfo.elevatorRatio+'户':'暂无数据';
				
				//供暖方式
				document.querySelector('#heatingName').innerHTML = houseInfo.heatingName?houseInfo.heatingName:'暂无数据';
				
				//上次交易
				var dateLastTrade = new Date(houseInfo.lastTradingDate);
				var strDateLastTrade = dateLastTrade.getFullYear() + '年' + (dateLastTrade.getMonth() + 1) + '月' + dateLastTrade.getDate()+'日';
				document.querySelector('#lastTradingDate').innerHTML = houseInfo.lastTradingDate?strDateLastTrade:'暂无数据';
				
				//房屋年限
				document.querySelector('#age').innerHTML = houseInfo.age?houseInfo.age+'年':'暂无数据';
				
				//房屋用途
				document.querySelector('#houseTypeName').innerHTML = houseInfo.houseTypeName?houseInfo.houseTypeName:'暂无数据';
				
				//交易权属
				document.querySelector('#propertyTypeName').innerHTML = houseInfo.propertyTypeName?houseInfo.propertyTypeName:'暂无数据';
				
				//产权所属
				document.querySelector('#propertyOwnerName').innerHTML = houseInfo.propertyOwnerName?houseInfo.propertyOwnerName:'暂无数据 ';
				
				//抵押信息
				document.querySelector('#mortgageBank').innerHTML = houseInfo.mortgageBank==0?'无抵押':'有抵押';
				
				//房本备件
				document.querySelector('#premisesPermit').innerHTML = houseInfo.premisesPermit?'已上传房本照片':'未上传房本照片';
//				for (idx in buildingParam) {
//					buildingList.push('<li class="mui-table-view-cell mui-clearfix">'+buildingParam[idx].key+'<span class="mui-pull-right">'+buildingParam[idx].value+'</span></li>')
//				}
//				document.querySelector('#buildingList').innerHTML = buildingList.join('');
//				
//				for (i in houseParam) {
//					houseInfoList.push('<li class="mui-table-view-cell mui-clearfix">'+houseParam[i].key+'<span class="mui-pull-right">'+houseParam[i].value+'</span></li>');
//				}
//				document.querySelector('#houseInfoList').innerHTML = houseInfoList.join('');
			})
		</script>
	</body>

</html>